<?php

use yii\helpers\Html;
use yii\widgets\LinkPager;

/**
 * @var yii\web\View $this
 * @var amnah\yii2\user\Module $module
 * @var array $actions
 */

$module = $this->context->module;

$this->title = Yii::t('region', 'Region Type Manger');
?>
<div class="user-default-index">

    <h1>Yii 2 User Module - <?= $module->getVersion(); ?></h1>
    <h1><?php echo Html::encode($this->title); ?></h1>

    <p>
        <?php echo Html::a(Yii::t('region', 'Create RegionType'), ['create'], ['class' => 'btn btn-success']); ?>
    </p>


<!--    --><?php //Pjax::begin(['options'=>['class'=>'nav-tabs-custom']]); ?>
<!---->
<!--    --><?//=  Tabs::widget([
//        'items' => [
//            [
//                'label' =>  "区域类型管理",
//                'content'=> $content,
//                'active' => true
//            ],
//            [
//                'label' => '添加区域',
//                'url'=>['create'],
//            ]
//        ],
//    ]);
//    ?>
<!--    --><?php //Pjax::end(); ?>

    <table class="table table-bordered">
        <tr>
            <th>区域名称</th>
            <th>父级区域</th>
            <th>父级区域名称</th>
        </tr>

        <?php foreach ($regionTypes as $regionType): ?>

            <tr>
                <td>
                    <strong><?= $regionType->region_type_name ?></strong>
                </td>
                <td>
                    <?= $regionType->parent_region_id ?>
                </td>
                <td>
                    <?= $regionType->parentRegionTypes->region_type_name ?>
                </td>


            </tr>

        <?php endforeach; ?>

    </table>
<?= LinkPager::widget(['pagination' => $pagination]) ?>
</div>
